package com.zhoug.common.validator.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 非空验证
 *
 * @Author: zhoug
 * @Date: 2022/9/23
 * @Description:
 */
@Retention(RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface ValidateNull {
    /**
     * 允许为空
     * @return
     */
    boolean allowEmpty() default false;

    /**
     * 错误提示
     *
     * @return
     */
    String describe() default "";

}
